1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a computer-readable storage medium storing instructions for performing image processing, and particularly relates to outline processing of an image.
2. Description of the Related Art
In recent years, with digitalization of information, a so-called paperless scheme has been advanced, in which a document is stored and/or transmitted and received as electronic data instead of using a paper medium. Meanwhile, with a paper medium printed out from an image forming apparatus, a shift from monochrome to full color has been advanced. Therefore, the need to scan a document printed in full color by a scanner or the like to generate image data, and to store this image data in a hard disk or the like, or transmit the same by attaching to an electronic mail has arises.
However, for example, when a full-color document of A4 size is scanned by a scanner at 300 dpi, raw image data (scanned data) is as large as about 25 MB, so that the file size is too large to be attached to an electronic mail.
Thus, the scanned data needs to be compressed to an appropriate file size. As such compression techniques, various ones have been proposed. For example, a method such as JPEG (Joint Photographic Experts Group) can be used. In the JPEG, quantizing the scanned data on a predetermined block basis causes a quantization error. Since this quantization error increases so much that a compression rate is increased, applying high compression to the scanned data may make characters in the document illegible.
Processing of outlining, in which a shape of a character scanned as the scanned data is handled as a set of functions each passing through a plurality of vertexes, has been put to practical use.
For example, Japanese Laid-Open Patent Publication No. 2006-253892 discloses an image processing method and an image processing apparatus, in which a small character is outlined using a high-resolution binary image, and a large character is outlined using a low-resolution binary image to thereby generate a high-grade outlined image while shortening processing time.
Moreover, Japanese Laid-Open Patent Publication No. 2005-174227 discloses an image processing apparatus capable of generating a high-quality electronic file with its data amount reduced, as an electronic file corresponding to the scanned original image by executing vector data conversion of an original image based on an image size of the original image, and a control method of the same, and a program for the same.
As a specific procedure of the above-described outline processing, a plurality of coordinate values of vertexes defining an object (including a character and the like) included in scanned data are detected, and with any of these coordinate values set as a reference, coordinate values of anchor points and/or coordinate values of Bézier control points for describing a function (Bézier curve) are calculated by arithmetic operation processing. Further, these coordinate values are converted using a specific conversion coefficient and are outputted as outline data. The arithmetic operation result at this time is outputted so as to be of a prescribed number of digits by round-off or the like.
Generally, the quality of the image subjected to the outline processing depends on precision (the number of digits) of each coordinate value, and a numeric value defined by a larger number of digits allows a higher-precision image to be reproduced. On the other hand, in terms of reduction in file size, it is preferable that the number of digits in which each coordinate value is represented be smaller.
As the size of a character included in the image is smaller, a variation amount between extracted coordinate values is smaller. Accordingly, for a document including a character of a smaller size, a higher precision with which such variation between the coordinate values can be represented is required. On the other hand, in a case where the outline processing is performed to a document including a character of a larger size with the precision suitable for the above-mentioned character of the smaller size, there arises a problem in that the file size unnecessarily becomes large.
On the contrary, in a case where the precision is made lower, sufficient image quality (legibility of character) for the document including the character of the smaller size disadvantageously cannot be kept.